﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SerializaRutasSimuladas
{
    public partial class FormInputBox : Form
    {
        public string InputText = String.Empty;
        
        public FormInputBox()
        {
            InitializeComponent();
        }

        private void button_ok_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            this.InputText = this.textBox_input.Text;
            this.Close();
        }



        private void textBox_input_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
        {
            if (e.KeyValue == Convert.ToChar(Keys.Enter))
            {
                this.DialogResult = DialogResult.OK;
                this.InputText = this.textBox_input.Text;
                this.Close();
            }
        }
    }
}
